<template>
    <el-menu
      default-active="0"
      background-color="#f5f5f5"
      >
      <el-submenu :index="i+''"   v-for="(item, i) in menuList">
        <template slot="title">
          <span>{{item.name}}</span>
        </template>
          <el-menu-item :index="i+'_'+i1+'_'"
            v-for="(sitem, i1) in item.list"
            @click.native="chooseMenu(sitem)"
          >{{sitem.name}}</el-menu-item>
      </el-submenu>
    </el-menu>
      
</template>

<script>

import { mapGetters } from 'vuex';

export default {
  name: 'menu1',
    data () {
    return {
        
    }
  },

  components: {

    
  },

  computed : {
      ...mapGetters([
        'menuList', 
      ]),
  },

  methods : {

      chooseMenu (item) {
          console.log(item);
          this.$router.push({ 
              name: item.href,
          });
      }
  },

  watch:{
      
  },

  mounted () {
    
    
  },

}
</script>

<style scoped>

</style>
